package gui;

import game.Game;

import com.jogamp.newt.event.WindowEvent;
import com.jogamp.newt.event.WindowListener;
import com.jogamp.newt.event.WindowUpdateEvent;

public class GameFrameListener implements WindowListener{
	

	
	@Override
	public void windowDestroyNotify(WindowEvent evt) {
		Game.getInstance().kill();
	}

	@Override
	public void windowDestroyed(WindowEvent evt) {
		Game.getInstance().kill();
	}

	@Override
	public void windowGainedFocus(WindowEvent evt) {
		System.out.println("Window gained focus");
	}

	@Override
	public void windowLostFocus(WindowEvent evt) {
		System.out.println("Window lost focus");
	}

	@Override
	public void windowMoved(WindowEvent evt) {
		System.out.println(" windowMoved");
	
	}

	@Override
	public void windowRepaint(WindowUpdateEvent evt) {
		System.out.println("Window repaint");
	}

	@Override
	public void windowResized(WindowEvent evt) {
		System.out.println("windowResized");	
		GameFrame.getInstance().setRequestResize(true);
	}
	
}
